<template>
  <div>
    <div id="nav">
      <ul>
        <li class="fl" @mouseenter="isShow = true">
          全部商品分类
        </li>

        <li>
          <router-link to="/">服装城</router-link>
        </li>
        <li>
          <router-link to="/">美妆馆</router-link>
        </li>
        <li>
          <router-link to="/">尚品汇超市</router-link>
        </li>
        <li>
          <router-link to="/">全球购</router-link>
        </li>
        <li>
          <router-link to="/">闪购</router-link>
        </li>
        <li>
          <router-link to="/">团购</router-link>
        </li>
        <li>
          <router-link to="/">有趣</router-link>
        </li>
        <li>
          <router-link to="/">秒杀</router-link>
        </li>
      </ul>
    </div>
    <LeftNav
      v-show="$route.path === '/' || isShow"
      @mouseout="isShow = false"
    />
  </div>
</template>

<script>
import LeftNav from "../LeftNav";

export default {
  name: "TopNav",
  data() {
    return {
      isShow: true,
    };
  },
  components: {
    LeftNav,
  },
};
</script>

<style></style>
